package com.salt.common.constant;

/**
 * @Description
 * @Author salt
 * @Date 2020-12-08
 * @Version 1.0.1
 */
public interface WorkConstant {

    interface SQL{

        String PI_SELECT_BASE_SNAPSHOT = "SELECT tag, time, value, status FROM [piarchive]..[pisnapshot] WHERE ";

        String PI_SELECT_BASE = "SELECT tag, time, value, status FROM [piarchive]..[picomp2] ";

        String PI_INSERT_BASE = "insert into [piarchive]..[picomp2] (tag,time,value) values ";

        String PI_SELECT_BASE_SUM = "SELECT SUM(if cast(value as float64) > 0 THEN cast(value as float64) ELSE 0) AS val FROM [piarchive]..[picomp2] ";

        String PI_PROCESS_ELEC_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Elec.PROCESS_TEM_HOUR_TOTAL + "'";

        String PI_POWER_ELEC_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Elec.POWER_TEM_HOUR_TOTAL + "'";

        String PI_DRYBAG_ELEC_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Elec.DRYBAG_TEM_HOUR_TOTAL + "'";

        String PI_GRAIN_ELEC_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Elec.GRAIN_TEM_HOUR_TOTAL + "'";

        String PI_SALT_ELEC_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Elec.SALT_TEM_HOUR_TOTAL + "'";

        String PI_WATER_WEST_A_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Water.WATER_WEST_HOUR_A + "'";

        String PI_WATER_WEST_B_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Water.WATER_WEST_HOUR_B + "'";

        String PI_FRESH_WATER_DAY_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Water.FRESH_WATER_DAY + "'";

        String PI_MINE_SUM = PI_SELECT_BASE_SUM + " WHERE tag = '" + PiTagConstant.Mine.MINE_HOUR + "'";

        String PI_MINE_HOUR_LIST = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Mine.MINE_HOUR + "'";

        String PI_MINE_HOUR_LIST_A = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Mine.MINE_HOUR_A + "'";

        String PI_MINE_HOUR_LIST_B = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Mine.MINE_HOUR_B + "'";

        String PI_MINE_HOUR_LIST_C = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Mine.MINE_HOUR_C + "'";

        String PI_MINE_HOUR_LIST_D = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Mine.MINE_HOUR_D + "'";

        String PI_POWDER_HOUR_LIST = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Product.POWDER_HOUR + "'";

        String PI_GRAIN_HOUR_LIST = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Product.GRAIN_HOUR + "'";

        String PI_TON_PACK_HOUR_LIST = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Product.TON_PACK_HOUR + "'";

        String PI_YIELD_TOTAL_HOUR_LIST = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Product.YIELD_TOTAL_HOUR + "'";

        String PI_FRESH_WATER_DAY_LIST = PI_SELECT_BASE + " WHERE tag = '" + PiTagConstant.Water.FRESH_WATER_DAY + "'";



    }
}
